# Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
# Contributor: Torin <jakub.laszczynski@gmail.com>
pkgname=metasploit3-svn
pkgver=6734
pkgrel=4
pkgdesc="The Metasploit Framework is an advanced open-source platform for developing, testing, and using exploit code"
makedepends=("subversion")
depends=('ruby' 'ruby-gtk2' 'ruby-libglade' 'perl' 'rubygems')
source=(metasploit3.sh LICENSE metasploit.desktop)
url="http://www.metasploit.com/"
license=('custom:"Metasploit Framework License v1.2"')
replaces=("metasploit3")
conflicts=("metasploit3")
provides=("metasploit3")
arch=('i686' 'x86_64')
md5sums=('ade22b22ec87ca2856a1cd823b89624e'
	       'f12a25129e2dbcf718f071e980228f36'
	       'af0738f2fbfaaf5bd1871bd1000421f0')
_svntrunk=https://www.metasploit.com/svn/framework3/trunk
_svnmod=metasploit
build() {
  cd "$srcdir"
  svn export $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  cd "$srcdir"
  msg "SVN checkout done or server timeout"
  msg "Starting make..."
	mkdir -p "${pkgdir}"/{opt,etc/profile.d,usr/share/licenses/metasploit3-svn,usr/share/applications}
	mv "${srcdir}"/$_svnmod "${pkgdir}"/opt/metasploit3
	cp "${srcdir}"/metasploit3.sh "${pkgdir}"/etc/profile.d
	cp "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/metasploit3-svn/
	cp "${srcdir}"/metasploit.desktop "${pkgdir}"/usr/share/applications/
}
